{extend name="frame/base" /}
{block name="body"}
<form action="{$url}" method="post"  enctype="multipart/form-data">
    <label>幻灯片标题<input name="title" id="title" type="text" value="{$info['title']|default=''}"/>
    </label>
    <label>幻灯片缩略图<input name="file" type="file"/>
    </label>
    <img  height="100" id="img" style="display: none">
    <label>幻灯片链接<input name="href" id="href" type="text" value="{$info['href']|default=''}"/>
    </label>
    <label>幻灯片排序<input name="sort" id="sort" type="text" value="{$info['sort']|default='0'}"/>
    </label>
    <input type="submit" value="保存" onclick="submit_form();return false">
</form>
<br>
<script>

    $(function () {
        var img="{$info['img']|default=''}";
        if(img!="")
        {
            $("#img").show();
            $("#img").attr("src",qiniuprefix+img+"?imageView2/2/w/2000/h/100/q/75");
        }
        $.datetimepicker.setLocale('ch');
        $('.some_class').datetimepicker({
            formatTime:'H:i',
            format:'Y-m-d H:i'
        });
    })
    function submit_form() {
        $("form").submit()
    }
</script>
{/block}
